package com.ruanyun.modular.admin.mapper;

import com.ruanyun.modular.admin.entity.VocReducingPlan;
import com.ruanyun.modular.admin.model.params.VocReducingPlanParam;
import com.ruanyun.modular.admin.model.result.ReduceResult;
import com.ruanyun.modular.admin.model.result.VocReducingPlanResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruanyun.modular.admin.model.result.VocsEmissionResult;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * VOCs综合减排措施 Mapper 接口
 * </p>
 *
 * @author zs
 * @since 2021-04-19
 */
@Repository
public interface VocReducingPlanMapper extends BaseMapper<VocReducingPlan> {

    /**
     * 获取列表
     *
     * @author zs
     * @Date 2021-04-19
     */
    List<VocReducingPlanResult> customList(@Param("paramCondition") VocReducingPlanParam paramCondition);

    /**
     * 获取map列表
     *
     * @author zs
     * @Date 2021-04-19
     */
    List<Map<String, Object>> customMapList(@Param("paramCondition") VocReducingPlanParam paramCondition);

    /**
     * 获取分页实体列表
     *
     * @author zs
     * @Date 2021-04-19
     */
    Page<VocReducingPlanResult> customPageList(@Param("page") Page page, @Param("paramCondition") VocReducingPlanParam paramCondition);


    Page<VocReducingPlanResult> customPageList1(@Param("page") Page page, @Param("paramCondition") VocReducingPlanParam paramCondition);

    /**
     * 获取分页map列表
     *
     * @author zs
     * @Date 2021-04-19
     */
    Page<Map<String, Object>> customPageMapList(@Param("page") Page page, @Param("paramCondition") VocReducingPlanParam paramCondition);


    List<VocReducingPlan> getList();


    Page<VocReducingPlanResult> getVocReducingPage(@Param("pageContext") Page pageContext);

    Page<ReduceResult> sourceList(@Param("page") Page page, @Param("paramCondition") VocReducingPlanParam paramCondition);


    @Select(" SELECT id FROM voc_reducing_plan WHERE company_id = #{cid} and del_flag != 2")
    Integer getIdByCid(@Param("cid") Integer cid );



}
